jQuery(document).ready(function(){ "use strict"; jQuery(".post-like a").on("click",function(){ var heart=jQuery(this); var post_id=heart.data("post_id"); jQuery.ajax({ type: "post", url: doc_ajax_var.url, data: { action: 'post-like', nonce: doc_ajax_var.nonce, post_id: post_id, post_like: '', }, success: function(data, textStatus, XMLHttpRequest){ jQuery("span.manual_doc_count").text(data); }, error: function(MLHttpRequest, textStatus, errorThrown){ }}); return false; }) jQuery(".post-unlike a").on("click",function(){ var heart=jQuery(this); var post_id=heart.data("post_id"); if(kb_display_feedback_form_onclick_thumbsdown==1){ jQuery('html,body').animate({ scrollTop: jQuery('.kb-respond-no-message').offset().top }, 2000); jQuery('.kb-feedback-showhide').show(); } jQuery.ajax({ type: "post", url: doc_ajax_var.url, data: { action: 'post-unlike', nonce: doc_ajax_var.nonce, post_id: post_id, post_like: '', }, success: function(data, textStatus, XMLHttpRequest){ jQuery("span.manual_doc_unlike_count").text(data); }, error: function(MLHttpRequest, textStatus, errorThrown){ }}); return false; }) jQuery(".post-reset a").on("click",function(){ var action=confirm("Are you sure you want to start reset (like/unlike/total post visitors) process. Once reset it cant be undone"); if(action==true){ var heart=jQuery(this); var post_id=heart.data("post_id"); jQuery.ajax({ type: "post", url: doc_ajax_var.url, data: { action: 'post-reset-stats', nonce: doc_ajax_var.nonce, post_id: post_id, post_reset: '', }, success: function(data, textStatus, XMLHttpRequest){ jQuery("span.manual_doc_count").text(''); jQuery("span.manual_doc_unlike_count").text(''); }, error: function(MLHttpRequest, textStatus, errorThrown){ }}); return false; }}) }); !function(d,l){"use strict";var e=!1,o=!1;if(l.querySelector)if(d.addEventListener)e=!0;if(d.wp=d.wp||{},!d.wp.receiveEmbedMessage)if(d.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!/[^a-zA-Z0-9]/.test(t.secret)){var r,a,i,s,n,o=l.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),c=l.querySelectorAll('blockquote[data-secret="'+t.secret+'"]');for(r=0;r'; if(typeof print_data!='undefined'&&typeof print_data[id]!='undefined'){ if('pom_site_css' in print_data[id]&&print_data[id]['pom_site_css']){ print_html +=''; } if('pom_custom_css' in print_data[id]&&print_data[id]['pom_custom_css']){ print_html +=''; } w.document.open(); w.document.write(print_html + ''); if('pom_do_not_print' in print_data[id]&&print_data[id]['pom_do_not_print']){ jQuery(print_data[id]['pom_do_not_print']).hide(); } if('pom_html_top' in print_data[id]&&print_data[id]['pom_html_top']){ jQuery(w.document.body).html(print_data[id]['pom_html_top']); }} var ua=window.navigator.userAgent; var ie=true; if(ua.indexOf("MSIE ")!=-1){ jQuery(w.document.body).append(jQuery(target).clone(true).html()); } else if(ua.indexOf("Trident/")!=-1){ jQuery(w.document.body).append(jQuery(target).clone(true).html()); } else if(ua.indexOf("Edge/")!=-1){ jQuery(target).each(function(){ var s=jQuery.trim(jQuery(this).clone(true).html()); jQuery(w.document.body).append("
" + s + "
"); }); }else{ jQuery(w.document.body).append(jQuery(target).clone(true)); ie=false; } if(typeof print_data!='undefined'&&typeof print_data[id]!='undefined'){ if('pom_do_not_print' in print_data[id]){ jQuery(print_data[id]['pom_do_not_print']).show(); } if('pom_html_bottom' in print_data[id]&&print_data[id]['pom_html_bottom']){ jQuery(w.document.body).append(jQuery.trim(print_data[id]['pom_html_bottom'])); }} if(ie){ jQuery(target).find('input[type=text]').each(function(){ var user_val=jQuery(this).val(); if(user_val){ var elem_id=jQuery(this).attr('id'); if(elem_id){ w.document.getElementById(elem_id).value=user_val; }else{ var elem_name=jQuery(this).attr('name'); if(elem_name.length){ named_elements=w.document.getElementsByName(elem_name); named_elements[0].value=user_val; }} }}); jQuery(target).find('select').each(function(i){ console.log('found one: ' + i); var sel_val=jQuery(this).val(); console.log('value is: ' + sel_val); if(sel_val){ var elem_id=jQuery(this).attr('id'); if(elem_id){ w.document.getElementById(elem_id).value=sel_val; }} }); } iframe=jQuery(w.document).find('iframe'); if(iframe.length&&typeof print_data!='undefined'&&typeof print_data[id]!='undefined'){ if('pom_pause_time' in print_data[id]&&print_data[id]['pom_pause_time'] < 3000){ print_data[id]['pom_pause_time']=3000; } else if(print_data[id]['pom_pause_time']==='undefined'){ print_data[id]['pom_pause_time']=3000; }} if(typeof print_data!='undefined'&&typeof print_data[id]!='undefined'&&'pom_pause_time' in print_data[id]&&print_data[id]['pom_pause_time'] > 0){ pause_time=setTimeout(printIt, print_data[id]['pom_pause_time']); }else{ printIt(); } function printIt(){ w.document.close(); console.log('try and print'); setTimeout(function (){ console.log('here we go'); w.focus(); try { w.document.execCommand ('print', false, null); } catch { w.print(); }}, 500); if('pom_close_after_print' in print_data[id]&&print_data[id]['pom_close_after_print']=='1'){ setTimeout( function(){ w.close() }, 1000 ); }} }); });